﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PayPal
{
    public partial class Test_IPN : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            string strText = TextBox1.Text;

            int intStart = strText.IndexOf("txn_id=");
            Response.Write(intStart.ToString() + "<br/>");

            if (intStart > 1)
            {
                string strTxid = strText.Substring(intStart + 7, 17);
                Response.Write(strTxid.ToString() + "<br/>");
            }
        }
    }
}